package com.event.common.model;

import com.alibaba.fastjson.JSONObject;
import lombok.Getter;
import lombok.Setter;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @Description 数据库监听配置
 * @Author Bing
 * @Date 2025/1/17 17:45
 */
@Getter
@Setter
public class DbListenConfig implements Serializable {
    private static final long serialVersionUID = 1L;
    // 数据库名
    private String dbName;
    // 表名和表映射
    private List<TableModel> tables;
    // 表名和表映射
    private Map<String, JSONObject> tableMap = new ConcurrentHashMap<>();
    // 表名和表Schema映射
    private Map<String,List<TableSchema>> tableSchemaMap = new ConcurrentHashMap<>();

    @Getter
    @Setter
    public static class TableModel implements Serializable{
        // 表名
        private String tableName;
        // 映射路径
        private String mapPath;
    }
}